#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>

int main()
{
	char arr1[20];
	int x = 0;
	for (x = 0;x < 20;x++)
		arr1[x] = '\0';
	int sz = 0;
	for (sz = 0;scanf("%c", &arr1[sz]) == 1;sz++);
	sz -= 1;

	int L = 0;
	int R = sz - 1;

	int turn = 0;
	if (sz % 2 == 1)
		turn = (sz + 1) / 2 + 1;
	else
		turn = sz / 2 + 1;

	int n = 0;
	for (n = 0;n < turn;n++)
	{
		for (;L < n;L++)
			printf("%c", arr1[L]);
		int m = L - 1;
		x = 0;
		for (x = 0;x < (sz - (L * 2));x++)
			printf(" ");
		for (;L > 0;L--)
		{
			if (m == R - L + 1)
				continue;
			printf("%c", arr1[R - L + 1]);
		}
			printf("\n");
	}

	return 0;
}